﻿Imports Microsoft.VisualBasic
Imports System.Data
Imports System.Data.SqlClient
Imports System.Configuration

Namespace HensonOnline
    Partial Public Class DataAccess

        Public Function dtFamilies() As DataTable
            Dim dt As New DataTable("Families")

            Dim dcFamilyId As New DataColumn("FamilyId", GetType(Integer))
            Dim dcPFamilyId As New DataColumn("PFamilyId", GetType(Integer))
            Dim dcFamilyName As New DataColumn("FamilyName", GetType(String))
            Dim dcMother As New DataColumn("Mother", GetType(String))
            Dim dcFather As New DataColumn("Father", GetType(String))
            Dim dcAddress As New DataColumn("Address", GetType(String))
            Dim dcCity As New DataColumn("City", GetType(String))
            Dim dcState As New DataColumn("State", GetType(String))
            Dim dcZip As New DataColumn("Zip", GetType(String))
            Dim dcPhone1 As New DataColumn("Phone1", GetType(String))
            Dim dcPhone2 As New DataColumn("Phone2", GetType(String))
            Dim dcMemberCount As New DataColumn("MemberCount", GetType(Integer))

            dt.Columns.Add(dcFamilyId)
            dt.Columns.Add(dcPFamilyId)
            dt.Columns.Add(dcFamilyName)
            dt.Columns.Add(dcMother)
            dt.Columns.Add(dcFather)
            dt.Columns.Add(dcAddress)
            dt.Columns.Add(dcCity)
            dt.Columns.Add(dcState)
            dt.Columns.Add(dcZip)
            dt.Columns.Add(dcPhone1)
            dt.Columns.Add(dcPhone2)
            dt.Columns.Add(dcMemberCount)

            Return dt
        End Function

        Public Function dtImages() As DataTable
            Dim dt As New DataTable("Images")
            Dim dcImgId As New DataColumn("ImgId", GetType(Integer))
            Dim dcUserId As New DataColumn("UserId", GetType(String))
            Dim dcTitle As New DataColumn("Title", GetType(String))
            Dim dcCaption As New DataColumn("Caption", GetType(String))
            Dim dcFilePath As New DataColumn("FilePath", GetType(String))
            Dim dcPrivate As New DataColumn("Private", GetType(Boolean))

            dt.Columns.Add(dcImgId)
            dt.Columns.Add(dcUserId)
            dt.Columns.Add(dcTitle)
            dt.Columns.Add(dcCaption)
            dt.Columns.Add(dcFilePath)
            dt.Columns.Add(dcPrivate)

            Return dt
        End Function

        Public Function dtEvents() As DataTable
            Dim dt As New DataTable("Events")

            Dim dcEventId As New DataColumn("EventId", GetType(Integer))
            Dim dcUserId As New DataColumn("UserId", GetType(Integer))
            Dim dcAlbumId As New DataColumn("AlbumId", GetType(Integer))
            Dim dcTitle As New DataColumn("Title", GetType(String))
            Dim dcDesc As New DataColumn("Desc", GetType(String))
            Dim dcDate As New DataColumn("Date", GetType(DateTime))
            Dim dcLocation As New DataColumn("Location", GetType(String))
            Dim dcAddress As New DataColumn("Address", GetType(String))
            Dim dcCity As New DataColumn("City", GetType(String))
            Dim dcState As New DataColumn("State", GetType(String))
            Dim dcZip As New DataColumn("Zip", GetType(String))
            Dim dcArchive As New DataColumn("Archive", GetType(Boolean))
            Dim dcPrivate As New DataColumn("Private", GetType(Boolean))

            dt.Columns.Add(dcEventId)
            dt.Columns.Add(dcUserId)
            dt.Columns.Add(dcAlbumId)
            dt.Columns.Add(dcTitle)
            dt.Columns.Add(dcDesc)
            dt.Columns.Add(dcDate)
            dt.Columns.Add(dcLocation)
            dt.Columns.Add(dcAddress)
            dt.Columns.Add(dcCity)
            dt.Columns.Add(dcState)
            dt.Columns.Add(dcZip)
            dt.Columns.Add(dcArchive)
            dt.Columns.Add(dcPrivate)

            Return dt
        End Function

    End Class
End Namespace

